package com.semidata.trp.decision.http;

import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.HttpRequest;

import com.semidata.rtd.core.http.server.AbstractDispatchHandler;
import com.semidata.rtd.core.http.server.HttpSession;
import com.semidata.rtd.core.service.ServiceManager;
import com.semidata.trp.decision.business.BusinessEvent;
import com.semidata.trp.decision.business.BusinessService;

public class BusinessJsonHttpHandler extends AbstractDispatchHandler{

    public BusinessJsonHttpHandler(ChannelHandlerContext ctx, HttpRequest request) {
        super(ctx, request);
    }

    @Override
    public void handle(HttpSession session) {
        BusinessService service = ServiceManager.getService(BusinessService.class);
        service.send(new BusinessEvent(BusinessEvent.Type.BUSINESS_JSON, session));
    }

}
